using System.Windows;

namespace PropertyExpression.PresentationCode
{
    internal static class InternalUtil
    {
        internal static Setter SetValue(
            this Setter setter,
            DependencyProperty dependencyProperty,
            object value)
        {
            setter.Property = dependencyProperty;
            setter.Value = value;
            return setter;
        }

        internal static TTemplate InternalNested<TTemplate>(
            this TTemplate it, IElementBase elementBase)
            where TTemplate : FrameworkTemplate
        {
            it.VisualTree = elementBase.FrameworkElementFactory;
            return it;
        }
    }
}